﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Alserve.Ffl;
using Alserve.Ffl.Data;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        AdminPlaceHolder.Visible = Session["Admin"] != null ? Convert.ToBoolean(Session["Admin"]) : false ;
        //Show or hide Profile menu items
        ProfileRegisterPlaceHolder.Visible = !Alserve.Ffl.Security.IsLoggedIn(Page);
        ProfileLoginPlaceHolder.Visible = !Alserve.Ffl.Security.IsLoggedIn(Page);
        ProfileUserProfilePlaceHolder.Visible = Alserve.Ffl.Security.IsLoggedIn(Page);
        ProfileMySquadPlaceHolder.Visible = Alserve.Ffl.Security.IsLoggedIn(Page);
        ProfilePickTeamPlaceholder.Visible = (Alserve.Ffl.Security.IsLoggedIn(Page) && !Alserve.Ffl.FflCommon.InRunning());
        ProfileLogoutPlaceHolder.Visible = Alserve.Ffl.Security.IsLoggedIn(Page);
    }

    
}
